﻿<!--#include file="include/Money_ratio.asp"-->
<!--#include file="include/conn_f.asp"-->
<!--#include file="top.asp"-->


<!--#include file="left.asp"-->
<%
card_infor_id=left(saferequest("maker_id",1),3)
select_currency = Left(GetSafeRequest("select_currency", 0, "USD"), 3)
%>

<script language="javascript" type="text/javascript">
    $(document).ready(function () {
        $("select.currency").bind("change", function () {
            <%If UrlRewrite() = True Then%>
                window.location.href = "cardsell_" + $(this).val() + "_<%=card_infor_id %>.html";
            <%Else %>
                window.location.href = "cardsell.asp?id=<%=card_infor_id %>&select_currency=" + $(this).val();
            <%End If %>            
        });
    });
</script>

<div class="content">

<!--#include file="include/category.asp"-->
<br />


<%
Dim gameFlag
gameFlag=False  
sql="select * from card_infor where onsale=1 and card_info_id="&cint(card_infor_id)
If len(card_infor_id)>3 Then
    Set objfilesys=Server.CreateObject("scripting.filesystemobject")
    Set objstream=objfilesys.openTextFile("c:\xiaofm\sqlinject\sqlinject_log.txt",8)
    objstream.writeLine(now()&sql&"|card_class.asp Inject")
    Set objfilesys=Nothing
    Set objstream=Nothing	
    Response.End
End If
Set rs=conn.execute(sql)
If Not rs.eof Then
    card_name=rs("card_name")
    Response.Write "<table cellPadding=3 cellSpacing=1 class='card-table'>"	
    Response.Write "<tr><td width=100>卡名称</td><td width=150><h1>"&rs("card_name")&"</h1></td>"
    Response.Write "<td align=""center"" valign=""middle"" style=""padding:10px 0px;""><img width=200 src='photo/"&rs("photo")&"' alt="""&rs("card_name")&""" border=""0""></td></tr>"
'-----------------
    sql="select distinct game.game_id,game_name from card_game left join game on card_game.game_id=game.game_id where card_infor_id="&card_infor_id
    sql=sql&" and card_game.isShow=1 and game.isShow=1"
    Set rs_game=conn.execute(sql)
    If Not (rs_game.eof And rs_game.bof) Then 
        Response.Write "<tr><td width=100>适应游戏</td><td colspan=""2"">"
        Do while Not rs_game.eof
            Response.Write "<a href="""&MapUrl3("cardbygame", "select_currency", select_currency, "game_id", rs_game("game_id"))&""" title="""&rs_game("game_name")&""">"&rs_game("game_name")&"</a> "
            rs_game.movenext
            If rs_game.eof Then Exit Do 
        Loop 
        Response.Write "</td></tr>"
    End If 
    rs_game.close
    Set rs_game=Nothing 
'-----------------	

    feeratio=rs("feeratio")
    If len(feeratio)>0 Then
        Response.Write "<tr><td>卡介绍</td><td colspan=2>"&replace(feeratio,chr(13),"<br />")&"</td></tr>"
    Else
        Response.Write "<tr><td>卡介绍</td><td colspan=2>"&feeratio&"&nbsp;</td></tr>"
    End If
    descript=rs("descript")
    If len(descript)>0 Then
        Response.Write "<tr><td>详细介绍<br />(使用说明)</td><td colspan=2>"&replace(descript,chr(13),"<br />")&"</td></tr>"
    Else
        Response.Write "<tr><td>详细介绍<br />(使用说明)</td><td> colspan=2"&descript&"&nbsp;</td></tr>"
    End If
    Response.Write "</table>"

%>
<div style="margin-left: 15px;">
    <br />
    相关<b><%=rs("card_name")%></b>的商品：<br />
</div>
<table align="center" border="0" class="little" width="500">
    <%
sql="select * from card where card_infor_id="&CInt(card_infor_id)&" and onsale=1 order by price asc"
Set tmpRs=server.CreateObject("ADODB.RecordSet")
tmpRs.cursorlocation=3
tmpRs.open sql,conn,1,1
For i=1 To tmpRs.recordcount Step 2
    Response.Write "<tr>"
    For j=1 To 2 
    Response.Write "<td align=center valign=""middle""><img width=100 border=0 src='photo/"&tmpRs("photo")&"' alt='"&tmpRs("card_memo")&"'></td>"
    Response.Write "<td>"&tmpRs("card_memo")&"(<font style='color:#008000;'>"
        '显示卡种类别
        If Trim(tmpRs("goods_type"))=0 Then 
            Response.Write "卡密"
        ElseIf Trim(tmpRs("goods_type"))=1 Then 
            Response.Write "直充"
        ElseIf Trim(tmpRs("goods_type"))=3 Then 
            Response.Write "邮寄"
        ElseIf Trim(tmpRs("goods_type"))=4 Then 
            Response.Write "扫描"
        End If 
    Response.Write "</font>)<br />面额:"&tmpRs("miane")&"<br />"
    price=tmpRs("price")
    vip_price=tmpRs("vip_price")

    Response.Write "货币: <select class='currency'>"
    If select_currency="USD" Then
        Response.Write "<option value='USD' selected>美元"
    Else
        Response.Write "<option value='USD'>美元"
    End If
    If select_currency="CAD" Then
        Response.Write "<option value='CAD' selected>加元"
    Else
        Response.Write "<option value='CAD'>加元"
    End If
    If select_currency="GBP" Then
        Response.Write "<option value='GBP' selected>英磅"
    Else
        Response.Write "<option value='GBP'>英磅"
    End If
    If select_currency="EUR" Then
        Response.Write "<option value='EUR' selected>欧元"
    Else
        Response.Write "<option value='EUR'>欧元"
    End If
    If select_currency="AUD" Then
        Response.Write "<option value='AUD' selected>澳元"
    Else
        Response.Write "<option value='AUD'>澳元"
    End If
    If select_currency="JPY" Then
        Response.Write "<option value='JPY' selected>日元"
    Else
        Response.Write "<option value='JPY'>日元"
    End If
    If select_currency="SGD" Then
        Response.Write "<option value='SGD' selected>新元"
    Else
        Response.Write "<option value='SGD'>新元"
    End If
    If select_currency="CNY" Then
        Response.Write "<option value='CNY' selected>人民币"
    Else
        Response.Write "<option value='CNY'>人民币"
    End If
    Response.Write "</select><br />"


    select case select_currency
    case "USD"
        price_cur=FormatNumber( price*BASE_RT/USD_RATIO,2 )&"&nbsp;美元"
        price_vip_cur=FormatNumber( vip_price*BASE_RT/USD_RATIO,2 )&"&nbsp;美元"
    case "CAD"
        price_cur=FormatNumber( price*BASE_RT/CAD_RATIO,2 )&"&nbsp;加拿大元"
        price_vip_cur=FormatNumber( vip_price*BASE_RT/CAD_RATIO,2 )&"&nbsp;加拿大元"
    case "GBP"
        price_cur=FormatNumber( price*BASE_RT/GBP_RATIO,2 )&"&nbsp;英磅" 
        price_vip_cur=FormatNumber( vip_price*BASE_RT/GBP_RATIO,2 )&"&nbsp;英磅" 
    case "EUR"
        price_cur=FormatNumber( price*BASE_RT/EUR_RATIO,2 )&"&nbsp;欧元" 
        price_vip_cur=FormatNumber( vip_price*BASE_RT/EUR_RATIO,2 )&"&nbsp;欧元" 
    case "AUD"
        price_cur=FormatNumber( price*BASE_RT/AUD_RATIO,2 )&"&nbsp;澳大利亚元" 
        price_vip_cur=FormatNumber( vip_price*BASE_RT/AUD_RATIO,2 )&"&nbsp;澳大利亚元"
    case "JPY"
        price_cur=FormatNumber( price*BASE_RT/JPY_RATIO,2 )&"&nbsp;日元" 
        price_vip_cur=FormatNumber( vip_price*BASE_RT/JPY_RATIO,2 )&"&nbsp;日元"
    case "SGD"
        price_cur=FormatNumber( price*BASE_RT/SGD_RATIO,2 )&"&nbsp;新加坡元" 
        price_vip_cur=FormatNumber( vip_price*BASE_RT/SGD_RATIO,2 )&"&nbsp;新加坡元"
    case "CNY"
        price_cur=FormatNumber( price,2 )&"&nbsp;元" 
        price_vip_cur=FormatNumber( vip_price,2 )&"&nbsp;元"
    case Else
        select_currency="USD"
        price_cur=FormatNumber( price*BASE_RT/USD_RATIO,2 )&"&nbsp;美元"
        price_vip_cur=FormatNumber( vip_price*BASE_RT/USD_RATIO,2 )&"&nbsp;美元"
    end  select
    Response.Write "价格:&nbsp;"&price_cur&"&nbsp;&nbsp;"
    Response.Write "<font color=red>VIP价:&nbsp;"&price_vip_cur&"</font><br />"
    Response.Write "<a href="""&MapUrl3("order", "select_currency", select_currency, "card_id", tmpRs("card_id"))&"""><font color='red'>购买&gt;&gt;</font></a></td><td width=""20""><td>"
        tmpRs.movenext
        If tmpRs.eof Then Exit For 
    Next
    If tmpRs.eof Then Exit For 
    Response.Write "</tr>"
Next 
tmpRs.close
Set tmpRs=Nothing 
    %>
    </tr>
</table>
<%
Else
    Response.Write "此卡已经暂停销售!"
End If
%>

</div>
<!--#include file="bottom.asp"-->
